package com.googlecode.bipol.war.session;

import java.sql.Date;
import java.sql.Timestamp;
import java.util.Locale;


/**
 * @see com.googlecode.bip.entity.IUser
 * @see com.googlecode.bip.entity.User
 */
@Deprecated // TODO: Delete this, use IBipSession instead
public interface _IBiPolSession
{

    /**
     * Reset session (disconnect)
     */
    public abstract void reset();

    /**
     * Indicate if client is connected with a user/password
     * @return true if current Session has an authentication
     */
    public abstract boolean isConnected();

    /* *
     *
     * @throws NotConnectedException if not connected
     * /
    public abstract void checkConnection() throws NotConnectedException;

    // TODO
    public abstract void checkReferentConnection() throws NotConnectedException;

    // TODO
    public abstract void checkAdminConnection() throws NotConnectedException;
*/
    /**
     * Returns current userId, if 0 no userid
     * @return current userId
     */
    public abstract int getUserid();

    /**
     * Set current userId, if 0 no userid
     * @param userid current userId
     * @param username current user name
     */
    public abstract void setUserid(final int userid, final String username);

    /**
     * Returns current user name
     * @return current user name
     */
    public abstract String getUsername();

    /**
     * Returns Locale for current user
     * @return Locale for current user
     */
    public abstract Locale getLocale();

    /**
     *
     */
    public abstract void setLocale(final Locale locale);

    /**
     * Returns idlocal for current user
     * @return idlocal for current user
     */
    public abstract String getIdlocal();

    /**
     *
     */
    public abstract void setIdlocal(final String idLocal);

    /**
     * Returns login date
     * @return login date
     * @see #getTime()
     */
    public abstract Timestamp getLoginTimestamp();

    /**
     * Returns login date as a long
     * @return login date as a long
     * @see Date#getTime()
     * @see #getLoginTimestamp()
     */
    public abstract long getLoginTime();

    /* (non-Javadoc)
     * @see java.lang.Object#toString()
     * /
    public abstract String toString();*/

}
